<template>
    <div class="containers">
        <div class="header">
            <img @click="goHome" src="../assets/images/pic_img2/btn_home.png" alt="">
        </div>
        <div class="title">将撤除以下班组的号志 (授权撤号人：{{teamUser}})</div>
        <div class="centers">
            <div class="center-table">
                <el-table stripe style="width: 100%; border: 1px solid #d8d8d8;" :data="dataList" :header-cell-style="{
                    background: '#086fd5',  // 表头背景色
                    color: '#fff',         // 文字颜色
                    fontSize: '24px',
                    height: '73px'         // 表头高度
                }" :cell-style="{ height: '73px', lineHeight: '73px' }">
                    <el-table-column label="序号" width="55" align="center" type="index" :show-overflow-tooltip="true" />
                    <el-table-column label="股道" align="center" prop="trackName" :show-overflow-tooltip="true" />
                    <el-table-column label="列位" align="center" prop="complete" :show-overflow-tooltip="true" />
                    <el-table-column label="车列号" align="center" prop="carCode" :show-overflow-tooltip="true" />
                    <el-table-column label="插号志人" align="center" prop="userName" :show-overflow-tooltip="true" />
                    <el-table-column label="班组" align="center" prop="workTeamName" :show-overflow-tooltip="true" />

                </el-table>
                <!-- <div style="margin-top: 50px;"></div> -->
                <!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
            </div>

        </div>
        <div class="beginButton" @click="endData">
            <img src="../assets/images/pic_img8/end_zy.png" alt="">
        </div>
        <div class="footers">Copyright © 2025 动车入库作业智能登销记系统</div>
    </div>
</template>
<script>
import { machinelist, ContingencyBtnEndClick } from '@/api/home'
export default {
    methods: {
        endData() {
            ContingencyBtnEndClick({
                teamUserId: this.teamUserId,
                teamUser: this.teamUser,
                startTime: this.startTime
            }).then(res => {
                setTimeout(() => {
                    this.$router.push("/login")
                }, 1000)
            })
        },
        goReturn() {
            this.$router.go(-1)
        },
        goHome() {
            this.$router.push("/login")
        }
    },
    created() {
        this.teamUserId = this.$route.query.teamUserId
        this.teamUser = this.$route.query.teamUser
        this.startTime = this.$route.query.startTime
        machinelist({
            teamUserId: this.teamUserId
        }).then(res => {
            console.log(res)
            this.dataList = res
        })
    },
    data() {
        return {
            startTime: '',
            teamUser: '',
            teamUserId: '',
            total: 2,
            queryParams: {
                pageNum: 1,
                pageSize: 10,
            },
            dataList: [{
                configName: '1'
            }, {
                configName: '1'
            },
            {
                configName: '1'
            }, {
                configName: '1'
            }, {
                configName: '1'
            }, {
                configName: '1'
            }, {
                configName: '1'
            }, {
                configName: '1'
            }, {
                configName: '1'
            }, {
                configName: '1'
            },
            {
                configName: '1'
            }]
        }
    }
}
</script>
<style lang="scss" scoped>
::v-deep .el-table .el-table__body tr:nth-child(2n) td {
    background-color: #ebf5fe !important;
}

::v-deep .el-table__empty-block {
    height: 81px !important;
    line-height: 81px !important;
}

.containers {
    width: 100%;
    height: 100%;
    background-image: url("../assets/images/pic_img2/track_bg.jpg");
    background-size: cover;
    position: relative;

    .header {
        height: 90px;
        position: absolute;
        left: 800px;
        top: 186px;
    }

    .beginButton {
        width: 288px;
        height: 95px;
        margin: auto;
        position: absolute;
        left: calc((100% - 288px) / 2);
        top: 1480px;
    }

    .title {
        position: absolute;
        left: 80px;
        top: 266px;
        font-family: Microsoft YaHei;
        font-size: 30px;
        font-weight: bold;
        color: #fff;
    }

    .centers {
        position: absolute;
        left: calc((100% - 1009px) / 2);
        top: 376px;
        width: 1009px;
        height: 1072px;
        background: #fff;

        .center-table {
            padding: 51px 37px 0 37px;
        }
    }
}
</style>